﻿/**
 * Peter
 * Created by: Peter Development Team
 *    http://peter.codeplex.com/
 * 
 * GNU General Public License version 2 (GPLv2)
 *    http://peter.codeplex.com/license
 *
 *  This code is provided on an AS IS basis, with no WARRANTIES,
 *  CONDITIONS or GUARANTEES of any kind.
 *
 **/

using System.Collections.Generic;
using ICSharpCode.AvalonEdit.Document;

namespace ICSharpCode.AvalonEdit.Folding
{
   /// <summary>
   /// Interface for folding strategies.
   /// </summary>
   public interface IFoldingStrategy
   {
      /// <summary>
      /// Create <see cref="NewFolding"/>s for the specified document and updates the folding manager with them.
      /// </summary>
      void UpdateFoldings(FoldingManager manager, TextDocument document);

      /// <summary>
      /// Create <see cref="NewFolding"/>s for the specified document.
      /// </summary>
      IEnumerable<NewFolding> CreateNewFoldings(TextDocument document, out int firstErrorOffset);
   }
}
